#include "filter_pt.h"
#include "ui_filter_pt.h"

Dialog_pt::Dialog_pt(QWidget* parent) :
    QDialog(parent),
    ui(new Ui::Dialog_pt)
{
    ui->setupUi(this);
}

Dialog_pt::~Dialog_pt()
{
    delete ui;
}

void Dialog_pt::on_buttonBox_accepted()
{
    emit sendData(ui->lineEdit_1->text(), ui->lineEdit_2->text(), axis, isSave);

    this->close();
}

void Dialog_pt::on_radioButton_clicked()
{
    if (ui->radioButton->isChecked())
    {
        ui->radioButton_2->setChecked(false);
        ui->radioButton_3->setChecked(false);
        axis = "x";
    }
}

void Dialog_pt::on_radioButton_2_clicked()
{
    if (ui->radioButton_2->isChecked())
    {
        ui->radioButton->setChecked(false);
        ui->radioButton_3->setChecked(false);
        axis = "y";
    }
}

void Dialog_pt::on_radioButton_3_clicked()
{
    if (ui->radioButton_3->isChecked())
    {
        ui->radioButton_2->setChecked(false);
        ui->radioButton->setChecked(false);
        axis = "z";
    }
}

void Dialog_pt::on_radioButton_4_clicked()
{
    if (ui->radioButton_4->isChecked())
    {
        ui->radioButton_5->setChecked(false);

        isSave = "0";
    }
}

void Dialog_pt::on_radioButton_5_clicked()
{
    if (ui->radioButton_5->isChecked())
    {
        ui->radioButton_4->setChecked(false);

        isSave = "1";
    }
}

